//
//  FunSelectTabHead.m
//  diaoyuren
//
//  Created by 钓鱼人 on 16/3/29.
//  Copyright © 2016年 game. All rights reserved.
//

#import "FunSelectTabHead.h"

@interface FunSelectTabHead ()
@property (weak, nonatomic) IBOutlet UIButton *titleBtn;

@property (weak, nonatomic) IBOutlet UILabel *todayLab;

@property (weak, nonatomic) IBOutlet UILabel *toalLab;
@property (weak, nonatomic) IBOutlet UILabel *footView;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *footHight;

@end

@implementation FunSelectTabHead


-(void)awakeFromNib{

    
    self.todayLab.font = font(SCREEN_WIDTH*0.04);
    self.toalLab.font = font(SCREEN_WIDTH*0.04);
    self.titleBtn.titleLabel.font = font(SCREEN_WIDTH*0.05);

}

-(void)setModel:(FunForumModel *)model{
    _model = model;

    if (_model.threadcount.intValue==0) {
        self.alpha = 0;
    }else{
        self.alpha = 1;
    }
    
//    NSLog(@"%d",_model.threadcount.intValue);
    
    [self.titleBtn setTitle:[NSString stringWithFormat:@" %@",_model.name] forState:UIControlStateNormal];
        
        self.toalLab.text = [NSString stringWithFormat:@"全部%@",_model.threadcount];
        
        self.todayLab.text = [NSString stringWithFormat:@"今日%@",_model.todayposts];
  
    
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
